<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
  <!ENTITY % htmlDTD
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">
  %htmlDTD;
  <!ENTITY % netErrorDTD
    SYSTEM "chrome://global/locale/netError.dtd">
  %netErrorDTD;

<!ENTITY loadError.label "页面载入出错">
<!ENTITY retry.label "重试">

<!-- Specific error messages -->

<!ENTITY connectionFailure.title "无法连接">
<!ENTITY connectionFailure.longDesc "&sharedLongDesc;">

<!ENTITY deniedPortAccess.title "此地址访问受限">
<!ENTITY deniedPortAccess.longDesc "">

<!ENTITY dnsNotFound.title "未找到服务器">
<!ENTITY dnsNotFound.longDesc "<ul> <li>请检查该站点名称没有错误，例如将  <q><strong>www</strong>.example.com</q> 写成  <q><strong>ww</strong>.example.com</q></li><li>如果您无法载入任何页面，请检查您计算机的网络连接。</li><li>您的计算机或网络是否被防火墙、代理服务器保护，请确认 &brandShortName; 得到授权可以访问网页。</li></ul>">

<!ENTITY fileNotFound.title "未找到文件">
<!ENTITY fileNotFound.longDesc "
<ul>
  <li>请检查文件名的大小写或者其他拼写错误。</li>
  <li>请检查文件是否被移动，重命名或者删除。</li>
</ul>
">


<!ENTITY generic.title "哎呀。">
<!ENTITY generic.longDesc "<p>&brandShortName; 因未知原因无法载入此页面。</p>">

<!ENTITY malformedURI.title "非法地址">
<!ENTITY malformedURI.longDesc "
<ul>
  <li>网页地址通常格式为
    <strong>http://www.example.com/</strong></li>
  <li>请确认您使用了正斜杠 (即
    <strong>/</strong>).</li>
</ul>
">

<!ENTITY netInterrupt.title "连接被中断">
<!ENTITY netInterrupt.longDesc "&sharedLongDesc;">

<!ENTITY notCached.title "文档已过期">
<!ENTITY notCached.longDesc "<p>请求的文档已无法在 &brandShortName; 的缓存中找到。</p><ul><li>为了安全起见，&brandShortName; 不会自动重新获取敏感文档。</li><li>请点击重试来重新请求从网站获取该文档。</li></ul>">

<!ENTITY netOffline.title "脱机模式">
<!ENTITY netOffline.longDesc2 "<ul>
  <li>按“重试”切换到在线模式并重新加载此页面。</li>
</ul>
">

<!ENTITY contentEncodingError.title "内容编码错误">
<!ENTITY contentEncodingError.longDesc "<ul><li>请联系网站的所有者以告知此问题。</li></ul>">

<!ENTITY unsafeContentType.title "不安全的文件类型">
<!ENTITY unsafeContentType.longDesc "
<ul>
  <li>请联系网站所有者并告知该问题。</li>
</ul>
">

<!ENTITY netReset.title "连接被重置">
<!ENTITY netReset.longDesc "&sharedLongDesc;">

<!ENTITY netTimeout.title "连接超时">
<!ENTITY netTimeout.longDesc "&sharedLongDesc;">

<!ENTITY protocolNotFound.title "无法理解该地址">
<!ENTITY protocolNotFound.longDesc "
<ul>
  <li>您可能需要安装其他软件以打开此地址。</li>
</ul>
">

<!ENTITY proxyConnectFailure.title "代理服务器拒绝连接">
<!ENTITY proxyConnectFailure.longDesc "<ul><li>请检查浏览器的代理服务器设置是否正确。</li><li>请联系您的网络管理员以确认代理服务器工作正常。</li></ul>">

<!ENTITY proxyResolveFailure.title "无法找到代理服务器">
<!ENTITY proxyResolveFailure.longDesc "<ul><li>请检查浏览器的代理服务器设置是否正确。</li><li>请检查您的计算机连到了可用网络。</li><li>如果您的计算机受到防火墙的保护，请确认 &brandShortName; 可以访问网页。</li></ul>">

<!ENTITY redirectLoop.title "此页面不能正确地重定向">
<!ENTITY redirectLoop.longDesc "<ul><li>此问题可能是因为禁用或拒绝 Cookie 导致。</li></ul>">

<!ENTITY unknownSocketType.title "不预期的服务器回应">
<!ENTITY unknownSocketType.longDesc "
<ul>
  <li>请检查您的系统安装了个人安全管理程序。</li>
  <li>这可能是因为服务器端非标准的配置所导致。</li>
</ul>
">

<!ENTITY nssFailure2.title "安全连接失败">
<!ENTITY nssFailure2.longDesc "<ul>
  <li>无法显示您尝试查看的页面，因为无法验证所收到数据的真实性。</li>
  <li>请联系网站的所有者以告知此问题。或者使用帮助菜单中的相关命令来报告此问题站点。</li>
</ul>">

<!ENTITY nssBadCert.title "安全连接失败">
<!ENTITY nssBadCert.longDesc2 "
<ul>
  <li>这可能是服务器配置错误，或者有人尝试模仿该服务器。</li>
  <li>如果您曾经成功连接至该过服务器，该错误可能只是暂时的，您可以稍后重试。</li>
</ul>
">

<!ENTITY sharedLongDesc "
<ul>
  <li>此站点暂时不可用或者太忙。请稍后重试。</li>
  <li>如果您无法载入任何页面，请检查您计算机的网络连接。</li>
  <li>如果您的计算机受到防火墙或代理服务器的保护，请确认 &brandShortName;  被授权访问网页。</li>
</ul>
">

<!ENTITY malwareBlocked.title "可疑的攻击站点！">
<!ENTITY malwareBlocked.longDesc " <p>攻击站点尝试通过安装程序来盗取隐私数据、使用您的计算机攻击他人或者破坏您的系统。</p> <p>网站所有者若认为自己的站点被错误地报告为攻击站点，可以<a href='http://www.stopbadware.org/home/reviewinfo' >请求评审</a>。</p> ">

<!ENTITY phishingBlocked.title "可疑的假冒网站！">
<!ENTITY phishingBlocked.longDesc "<p>在本页面输入个人信息可能会导致帐号被窃或其他欺诈。</p>
<p>这些欺诈网站均用于钓鱼攻击，在这些攻击中，伪装的网页或邮件地址可能用来假冒您信任的源地址。</p>">

<!ENTITY cspFrameAncestorBlocked.title "由于内容安全策略而被阻止">
<!ENTITY cspFrameAncestorBlocked.longDesc "<p>页面的内容安全策略导致 &brandShortName; 阻止以该方式载入此页。</p>">

<!ENTITY corruptedContentError.title "内容损坏错误">
<!ENTITY corruptedContentError.longDesc "<p>您要查看的该页面无法显示，因为检测到数据传输错误。</p><ul><li>请联系网站所有者通知他们这个问题。</li></ul>">


<!ENTITY securityOverride.linkText "或者，您可以添加一个例外…">
<!ENTITY securityOverride.getMeOutOfHereButton "离开这里！">
<!ENTITY securityOverride.exceptionButtonLabel "添加例外…">

<!-- LOCALIZATION NOTE (securityOverride.warningContent) - Do not translate the
contents of the <button> tags. It uses strings already defined above. The
button is included here (instead of netError.xhtml) because it exposes
functionality specific to firefox. -->

<!ENTITY securityOverride.warningContent "<p>如果您使用的是一个您不完全信任的因特网连接，或者您不习惯看到此服务器的警告，您不应该添加一个例外。</p>

<button id='getMeOutOfHereButton'>&securityOverride.getMeOutOfHereButton;</button>
<button id='exceptionDialogButton'>&securityOverride.exceptionButtonLabel;</button>">

<!ENTITY remoteXUL.title "远程 XUL">
<!ENTITY remoteXUL.longDesc "<p><ul><li>请联系网站拥有者告知这个问题。</li></ul></p>">

  <!ENTITY % globalDTD
    SYSTEM "chrome://global/locale/global.dtd">
  %globalDTD;
]>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is mozilla.org code.
   -
   - The Initial Developer of the Original Code is
   - Netscape Communications Corporation.
   - Portions created by the Initial Developer are Copyright (C) 1998
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Adam Lock <adamlock@netscape.com>
   -   William R. Price <wrprice@alumni.rice.edu>
   -   Henrik Skupin <mozilla@hskupin.info>
   -   Jeff Walden <jwalden+code@mit.edu>
   -   Johnathan Nightingale <johnath@mozilla.com>
   -   Ehsan Akhgari <ehsan.akhgari@gmail.com>
   -   Steffen Wilberg <steffen.wilberg@web.de>
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>页面载入出错</title>
    <link rel="stylesheet" href="like_data/netError.css" type="text/css" media="all" />
    <!-- If the location of the favicon is changed here, the FAVICON_ERRORPAGE_URL symbol in
         toolkit/components/places/src/nsFaviconService.h should be updated. -->
    <link rel="icon" type="image/png" id="favicon" href="chrome://global/skin/icons/warning-16.png" />

    <script type="application/javascript"><![CDATA[
      // Error url MUST be formatted like this:
      //   moz-neterror:page?e=error&u=url&d=desc
      //
      // or optionally, to specify an alternate CSS class to allow for
      // custom styling and favicon:
      //
      //   moz-neterror:page?e=error&u=url&s=classname&d=desc

      // Note that this file uses document.documentURI to get
      // the URL (with the format from above). This is because
      // document.location.href gets the current URI off the docshell,
      // which is the URL displayed in the location bar, i.e.
      // the URI that the user attempted to load.

      function getErrorCode()
      {
        var url = document.documentURI;
        var error = url.search(/e\=/);
        var duffUrl = url.search(/\&u\=/);
        return decodeURIComponent(url.slice(error + 2, duffUrl));
      }

      function getCSSClass()
      {
        var url = document.documentURI;
        var matches = url.match(/s\=([^&]+)\&/);
        // s is optional, if no match just return nothing
        if (!matches || matches.length < 2)
          return "";

        // parenthetical match is the second entry
        return decodeURIComponent(matches[1]);
      }

      function getDescription()
      {
        var url = document.documentURI;
        var desc = url.search(/d\=/);

        // desc == -1 if not found; if so, return an empty string
        // instead of what would turn out to be portions of the URI
        if (desc == -1)
          return "";

        return decodeURIComponent(url.slice(desc + 2));
      }

      function retryThis(buttonEl)
      {
        // If this is the "Offline mode" page, go online!
        if (getErrorCode() == "netOffline") {
          window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
                .getInterface(Components.interfaces.nsIDOMWindowUtils)
                .goOnline();
        }

        // Session history has the URL of the page that failed
        // to load, not the one of the error page. So, just call
        // reload(), which will also repost POST data correctly.
        try {
          location.reload();
        } catch (e) {
          // We probably tried to reload a URI that caused an exception to
          // occur;  e.g. a nonexistent file.
        }

        buttonEl.disabled = true;
      }

      function initPage()
      {
        var err = getErrorCode();
        
        // if it's an unknown error or there's no title or description
        // defined, get the generic message
        var errTitle = document.getElementById("et_" + err);
        var errDesc  = document.getElementById("ed_" + err);
        if (!errTitle || !errDesc)
        {
          errTitle = document.getElementById("et_generic");
          errDesc  = document.getElementById("ed_generic");
        }

        var title = document.getElementById("errorTitleText");
        if (title)
        {
          title.parentNode.replaceChild(errTitle, title);
          // change id to the replaced child's id so styling works
          errTitle.id = "errorTitleText";
        }

        var sd = document.getElementById("errorShortDescText");
        if (sd)
          sd.textContent = getDescription();

        var ld = document.getElementById("errorLongDesc");
        if (ld)
        {
          ld.parentNode.replaceChild(errDesc, ld);
          // change id to the replaced child's id so styling works
          errDesc.id = "errorLongDesc";
        }

        // remove undisplayed errors to avoid bug 39098
        var errContainer = document.getElementById("errorContainer");
        errContainer.parentNode.removeChild(errContainer);

        var className = getCSSClass();
        if (className && className != "expertBadCert") {
          // Associate a CSS class with the root of the page, if one was passed in,
          // to allow custom styling.
          // Not "expertBadCert" though, don't want to deal with the favicon
          document.documentElement.className = className;

          // Also, if they specified a CSS class, they must supply their own
          // favicon.  In order to trigger the browser to repaint though, we
          // need to remove/add the link element. 
          var favicon = document.getElementById("favicon");
          var faviconParent = favicon.parentNode;
          faviconParent.removeChild(favicon);
          favicon.setAttribute("href", "chrome://global/skin/icons/" + className + "_favicon.png");
          faviconParent.appendChild(favicon);
        }
        if (className == "expertBadCert") {
          showSecuritySection();
        }

        if (err == "remoteXUL") {
          // Remove the "Try again" button for remote XUL errors given that
          // it is useless.
          document.getElementById("errorTryAgain").style.display = "none";
        }

        if (err == "cspFrameAncestorBlocked") {
          // Remove the "Try again" button for CSP frame ancestors violation, since it's
          // almost certainly useless. (Bug 553180)
          document.getElementById("errorTryAgain").style.display = "none";
        }

        if (err == "nssBadCert") {
          // Remove the "Try again" button for security exceptions, since it's
          // almost certainly useless.
          document.getElementById("errorTryAgain").style.display = "none";
          document.getElementById("errorPageContainer").setAttribute("class", "certerror");
          addDomainErrorLink();
        }
        else {
          // Remove the override block for non-certificate errors.  CSS-hiding
          // isn't good enough here, because of bug 39098
          var secOverride = document.getElementById("securityOverrideDiv");
          secOverride.parentNode.removeChild(secOverride);
        }
      }
      
      function showSecuritySection() {
        // Swap link out, content in
        document.getElementById('securityOverrideContent').style.display = '';
        document.getElementById('securityOverrideLink').style.display = 'none';
      }
      
      /* In the case of SSL error pages about domain mismatch, see if
         we can hyperlink the user to the correct site.  We don't want
         to do this generically since it allows MitM attacks to redirect
         users to a site under attacker control, but in certain cases
         it is safe (and helpful!) to do so.  Bug 402210
      */
      function addDomainErrorLink() {
        // Rather than textContent, we need to treat description as HTML
        var sd = document.getElementById("errorShortDescText");
        if (sd) {
          var desc = getDescription();
          
          // sanitize description text - see bug 441169
          
          // First, find the index of the <a> tag we care about, being careful not to
          // use an over-greedy regex
          var re = /<a id="cert_domain_link" title="([^"]+)">/;
          var result = re.exec(desc);
          if(!result)
            return;
          
          // Remove sd's existing children
          sd.textContent = "";

          // Everything up to the link should be text content
          sd.appendChild(document.createTextNode(desc.slice(0, result.index)));
          
          // Now create the link itself
          var anchorEl = document.createElement("a");
          anchorEl.setAttribute("id", "cert_domain_link");
          anchorEl.setAttribute("title", result[1]);
          anchorEl.appendChild(document.createTextNode(result[1]));
          sd.appendChild(anchorEl);
          
          // Finally, append text for anything after the closing </a>
          sd.appendChild(document.createTextNode(desc.slice(desc.indexOf("</a>") + "</a>".length)));
        }

        var link = document.getElementById('cert_domain_link');
        if (!link)
          return;
        
        var okHost = link.getAttribute("title");
        var thisHost = document.location.hostname;
        var proto = document.location.protocol;

        // If okHost is a wildcard domain ("*.example.com") let's
        // use "www" instead.  "*.example.com" isn't going to
        // get anyone anywhere useful. bug 432491
        okHost = okHost.replace(/^\*\./, "www.");

        /* case #1: 
         * example.com uses an invalid security certificate.
         *
         * The certificate is only valid for www.example.com
         *
         * Make sure to include the "." ahead of thisHost so that
         * a MitM attack on paypal.com doesn't hyperlink to "notpaypal.com"
         *
         * We'd normally just use a RegExp here except that we lack a
         * library function to escape them properly (bug 248062), and
         * domain names are famous for having '.' characters in them,
         * which would allow spurious and possibly hostile matches.
         */
        if (endsWith(okHost, "." + thisHost))
          link.href = proto + okHost;

        /* case #2:
         * browser.garage.maemo.org uses an invalid security certificate.
         *
         * The certificate is only valid for garage.maemo.org
         */
        if (endsWith(thisHost, "." + okHost))
          link.href = proto + okHost;
      }
      
      function endsWith(haystack, needle) {
        return haystack.slice(-needle.length) == needle;
      }

    ]]></script>
  </head>

  <body dir="ltr">

    <!-- ERROR ITEM CONTAINER (removed during loading to avoid bug 39098) -->
    

    <!-- PAGE CONTAINER (for styling purposes only) -->
    <div id="errorPageContainer">
    
      <!-- Error Title -->
      <div id="errorTitle">
        <h1 id="errorTitleText">无法连接</h1>
      </div>
      
      <!-- LONG CONTENT (the section most likely to require scrolling) -->
      <div id="errorLongContent">
      
        <!-- Short Description -->
        <div id="errorShortDesc">
          <p id="errorShortDescText">Firefox  无法建立到 www.facebook.com 服务器的连接。</p>
        </div>

        <!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
        <div id="errorLongDesc">
<ul>
  <li>此站点暂时不可用或者太忙。请稍后重试。</li>
  <li>如果您无法载入任何页面，请检查您计算机的网络连接。</li>
  <li>如果您的计算机受到防火墙或代理服务器的保护，请确认 Firefox  被授权访问网页。</li>
</ul>
</div>

        <!-- Override section - For ssl errors only.  Removed on init for other
             error types.  -->
        
      </div>

      <!-- Retry Button -->
      <button id="errorTryAgain" autocomplete="off" onclick="retryThis(this);">重试</button>

    </div>

    <!--
    - Note: It is important to run the script this way, instead of using
    - an onload handler. This is because error pages are loaded as
    - LOAD_BACKGROUND, which means that onload handlers will not be executed.
    -->
    <script type="application/javascript">initPage();</script>

  </body>
</html>